<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
  <head>
    <base href="<%=basePath%>" />
    <title>Building Detail Information</title>
    <script type="text/javascript">
		var path = "<%=basePath%>";
	</script>
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="cache-control" content="no-cache" />
	<meta http-equiv="expires" content="0" />    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
	<meta http-equiv="description" content="This is my page" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>beshs/css/content.css" />
	<link type="text/css" href="<%=basePath%>beshs/css/frame_style.css" rel="stylesheet" />
	<link type="text/css" href="<%=basePath%>beshs/css/element_style.css" rel="stylesheet" />
	<script type="text/javascript" src="<%=basePath%>resources/jquery/jquery-1.7.2.min.js"></script>
	<!-- 页面特效 -->
	<jsp:include page="/beshs/res-refer/page-effect-reference.jsp" />
	<!-- 系统通用资源 -->
	<jsp:include page="/resources/resource-refer/common-resource-reference.jsp" />
	<!-- 用户访问菜单路径 -->
	<jsp:include page="/resources/usertrace/common-uservisit-reference.jsp" />
	<!-- iframe高度自适应 -->
	<script type="text/javascript">
        function getOsName() { 
    		var OsObject = ""; 
		   	if(navigator.userAgent.indexOf("MSIE")>0) { 
		    	return "MSIE"; 
		   	} 
		   	if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){ 
		        return "Firefox"; 
		   	} 
		   	if(isSafari=navigator.userAgent.indexOf("Safari")>0) { 
		        return "Safari"; 
		   	}  
		  	if(isCamino=navigator.userAgent.indexOf("Camino")>0){ 
		        return "Camino"; 
		   	} 
		   	if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){ 
		        return "Gecko"; 
		   	} 
		} 
        
        /** 根据浏览器类型选择iframe自适应方式 **/
        function setIframeHeightAutosize() {
        	//获取Iframe对象 ie和firefox都可以获得
        	var brIframe = document.getElementById("buildingRoomMgr"); 
        	var btpIframe = document.getElementById("buildingTempPointMgr");
        	try{
                if(getOsName() == 'MSIE'){
                	//热用户
                    var lbHeight = brIframe.document.body.scrollHeight; //IE
                    brIframe.style.height =  lbHeight + "px"; 
                    //温度点
                    var cbHeight = btpIframe.document.body.scrollHeight; //IE
                    btpIframe.style.height =  cbHeight + "px"; 
                }else if(getOsName() == 'Firefox'){
                	//热用户
                    var lfHeight = brIframe.contentDocument.body.scrollHeight; //FireFox 
                    brIframe.height = lfHeight + "px";   
                    //温度点
                    var cfHeight = btpIframe.contentDocument.body.scrollHeight; //FireFox 
                    btpIframe.height = cfHeight + "px";       
                } else {
                    brIframe.style.height = 400 + "px";
                    btpIframe.style.height = 400 + "px";                
                }          
            } catch (ex){}
		}
		
		$(function() {
			setIframeHeightAutosize();
		})
    </script>
  </head>
  <body>
  	<div class="content_all">
  		<!--导航条-->
  		<div class="insertinfo_table">
		  	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  		<tr>
		  			<th style="text-align: center;" colspan="6" >Building Information</th>
		  		</tr>
		  		 <tr>
		        	<th>Project：</th>
		          	<td><s:property value='project.projectName' /></td>
		          	<th>District：</th>
		          	<td><s:property value='community.communityName' /></td>
		          	<th>Building No.：</th>
		        	<td><s:property value='building.buildingID' /></td>
		        </tr>
		        <tr>
		        	<th>Building Area(reference)：</th>
		        	<td><s:property value='building.buildingArea' />&nbsp;m&sup2;</td>
		        	<th>Heat User Quantity：</th>
		          	<td><s:property value='statisEntity.heatRoomSum' /></td>
		          	<th>Heating Area：</th>
		          	<td>
		          		<s:text name="fmt.number.precision.three">
		          			<s:param value='statisEntity.roomHeatAreaSum' />
		          		</s:text>
		          		m&sup2;
		          	</td>
		        </tr>
		        <tr>
		        	<th>Allocator Quantity：</th>
		          	<td>
		          		<s:text name="fmt.number.precision.zero">
		          			<s:param value='statisEntity.assignMeterSum' />
		          		</s:text>
		          	</td>
		          	<th>Radiator Quantity：</th>
		          	<td>
		          		<s:text name="fmt.number.precision.zero">
		          			<s:param value='statisEntity.heatSinkerSum' />
		          		</s:text>
		          	</td>
		          	<th>Temperature Spot Quantity：</th>
		          	<td>
		          		<s:text name="fmt.number.precision.zero">
		          			<s:param value='statisEntity.tempPointSum' />
		          		</s:text>
		          	</td>
		        </tr>
		        <tr>
		        	<th>Remark：</th>
			        <td colspan="3" style="white-space: normal;">
			        	<s:property value='building.remark' />
			        </td>
			        <th>Building Attachment</th>
		        	<td>
		        		<script type="text/javascript">
			        		function downloadAttach(fileMappingUID) {
	            				window.location = path + "beshs/fileMappingAction!downloadAttachFile.do?fileMappingUID="+fileMappingUID+"&date="+new Date();
	            			}
		        		</script>
		        		<s:if test="attachFileMap != null">
            				<p class='fileName_load_txt'>
            					<a href="javascript:downloadAttach('<s:property value='attachFileMap.id' />')"><s:property value="attachFileMap.orFilename" />.<s:property value="attachFileMap.fileType" /></a>
            				</p>
            			</s:if>
		        	</td>
		        </tr>
		        <tr>
		        	<th></th>
          			<td style="border:none" colspan="5">
          				<script type="text/javascript">
          					$(function() {
          						$("input[name='goBack']").click(function() {
          							//window.location = path + "beshs/shareAreaResultAction!queryAreaResultPage.do?date="+new Date();
          							history.go(-1);
          						});
          					})
          				</script>
            			<input name="goBack" type="reset" value="Return" class="s_btn"/></td>
        		</tr>		
		    </table>
		</div>
		<div class="clear"></div>
  		<!--查询列表-->
	  	<ul class="nav_menu"><!--选项卡开始-->
	    	<li class="selected"><span>Heat User</span></li>
	    	<li><span>Temperature Spot</span></li>
	  	</ul>
	  	<div class="nav_content">
	   	 	<div class="ct">
	   	 		<iframe frameborder="0" name="buildingRoomMgr" scrolling="auto" id="buildingRoomMgr" src="<%=basePath%>beshs/heatRoomAction!queryRoomListByReferBuilding.do?buildingUID=<s:property value='building.id' />" height="90%" width="100%"></iframe>
	   	 	</div>
	    	<div class="ct">
	    		<iframe frameborder="0" name="buildingTempPointMgr" scrolling="auto" id="buildingTempPointMgr" src="<%=basePath%>beshs/temperaturePointAction!queryTempPointListByReferBuilding.do?buildingUID=<s:property value='building.id' />" height="90%" width="100%"></iframe>
	    	</div>
	  	</div><!--选项卡结束-->
	</div>
  </body>
</html>
